﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace FactoryAndStrategy
{
    public class StrategyFactory
    {
        public static IDeduction GetDeduction(StrategyMan strategy)
        {
            IDeduction deduction = null;
            try
            {
                deduction = (IDeduction)Assembly.Load("FactoryAndStrategy").CreateInstance(strategy.ToDescription());
            }
            catch (Exception ex) {
                
            }
            return deduction;
        }
    }
}
